using System;

namespace CKS.EBE.WebControls
{
    public class PostTrackbacks : SingleListQuery
    {
        protected override void OnInit(EventArgs e)
        {
            ListName = "LinkbacksReceived";
            ViewFieldsXML = "<FieldRef Name='Title'/><FieldRef Name='_ModerationStatus'/><FieldRef Name='Created'/><FieldRef Name='PostTitle'/>" +
                "<FieldRef Name='LinkbackType'/><FieldRef Name='BlogName'/><FieldRef Name='LinkingPost'/><FieldRef Name='LinkingPostExcerpt'/><FieldRef Name='BlogName'/>";
            QueryXML = string.Format("<Where><And><Eq><FieldRef Name='_ModerationStatus'/><Value Type='Number'>0</Value></Eq><Eq><FieldRef Name='PostTitle' LookupId='TRUE'/><Value Type='Lookup'>{0}</Value></Eq></And></Where><OrderBy><FieldRef Name='Created' /></OrderBy>", Page.Request["id"]);

            base.OnInit(e);
        }
    }
}
